import sequelize from "../../db/dbConnext";
import { option } from "../../db/commomConfig";
import { DataTypes, Model } from "sequelize";
import AdminEntity from "../../../entities/system/AdminEntity";

export type IAdmin = Omit<AdminEntity, "validateThis">;

const Admin = sequelize.define<Model, IAdmin>(
  "admin",
  {
    name: {
      type: DataTypes.STRING,
      allowNull: false,
    },
    loginId: {
      type: DataTypes.STRING,
      allowNull: false,
    },
    loginPwd: {
      type: DataTypes.STRING,
      allowNull: false,
    },
  },
  option
);
export default Admin;
